Skip to content

Support for invoke local #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 24, 2017

Conversation

kopertop
Copy link
Contributor

This adds support for the lifecycle hooks to make sls invoke local -f <funcName> work.

This fixes #8

src/index.ts Outdated
@@ -90,6 +118,14 @@ class ServerlessPlugin {
// Remove temp build folder
fs.removeSync(path.join(this.originalServicePath, buildFolder))
}

async cleanup(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we somehow avoid that redundancy as the same code is also part of the previous function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can, since the after function actually uses originalServicePath, I think I can run the cleanup steps after everything in that function.

@schickling schickling merged commit f6725f3 into serverless:master May 24, 2017
@schickling
Copy link
Contributor

Would you mind adding some docs to the readme about this feature?

@marshall007
Copy link

@schickling can you tag a release for this change and publish to npm? What kind of docs are you looking for? The current state of serverless invoke local not working in conjunction with this plugin just seems like a bug. I don't think the functionality needs to be explicitly documented.

@schickling
Copy link
Contributor

Done!

@marshall007
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sls invoke local does not work
3 participants